package com.exercise.DesignPattern.BehavioralPatterns.MediatorPattern;

public class Client {
    public static void main(String[] args) {
        ConcreteMediator mediator = new ConcreteMediator();
        ComponentA componentA = new ComponentA(mediator);
        ComponentB componentB = new ComponentB(mediator);
        mediator.setComponentA(componentA);
        mediator.setComponentB(componentB);

        componentA.triggerEvent("Event A");
        componentB.handleEvent("Event B");
    }
}
